﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.Sql;
using Net;

namespace WFAExamAuto
{
    public partial class FrmMain : Form
    {
        public NetService Ns = new NetService();
        public ClientProcedureService cps = new ClientProcedureService();
        public string UserName;
        public void GuestLimit()
        {
            文件ToolStripMenuItem.Enabled = true;

            
        }
        public FrmMain()
        {
            InitializeComponent();
        }

        private void FrmMain_Load(object sender, EventArgs e)
        {
            GuestLimit();
        }

        private void 试卷生成向导GToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SysOperate.frmExamAutoGuide eag = new SysOperate.frmExamAutoGuide();
            eag.fmain = this;
            eag.Show();
        }

        private void 帮助ToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

       //备份文件路径设置
        private void 本分文件路径设置ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SysSettings.frmBackUp bu = new SysSettings.frmBackUp();
            bu.fmain = this;
            bu.ShowDialog();
        }

        private void 用户基本资料设置ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SysSettings.frmUser u = new SysSettings.frmUser();
            u.fmain = this;
            u.ShowDialog();
        }

        private void 试题基本资料设置ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SysSettings.FrmQuestions q = new SysSettings.FrmQuestions();
            q.frmMain = this;
            q.ShowDialog();
        }

        private void 课程管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SysManage.Subject s = new SysManage.Subject();
            s.fmain = this;
            s.ShowDialog();
        }

        private void 试题管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SysManage.frmQuestion q = new SysManage.frmQuestion();
            q.fmain = this;
            q.Show();
        }

        private void 试卷管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SysManage.frmExamMan em = new SysManage.frmExamMan();
            em.fmain = this;
            em.Show();
        }

        private void 模板管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SysManage.frmModel m = new SysManage.frmModel();
            m.fmain = this;
            m.Show();
        }

        private void 用户管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SysManage.frmUser u = new SysManage.frmUser();
            u.fmain = this;
            u.Show();
        }

        private void 修改密码ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SysOperate.FrmUpdatePassword up = new SysOperate.FrmUpdatePassword();
            up.fmain = this;
            up.ShowDialog();
        }

        private void 打开试卷ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SysOperate.frmExamPreview ep = new SysOperate.frmExamPreview();
            ep.fmain = this;
            ep.Show();
        }

        private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {

        }

        public  void tsbtnLogin_Click(object sender, EventArgs e)
        {
            FrmLogin l = new FrmLogin();
            l.fmain = this;
            l.ShowDialog();
        }

        private void 保存试卷ToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }
    }
}
